use "$path\datasets\rd_dataset.dta", clear
keep if in_rdd_sample==1
bysort gkz legislative_period partei: keep if _n==1

gen other = (csu==0 & spd==0 & greens==0)

egen sum_csu=sum(csu)
egen sum_spd=sum(spd)
egen sum_greens=sum(greens)
egen sum_others=sum(other)

keep sum_csu sum_spd sum_greens sum_others
keep if _n==1

graph bar sum_csu sum_spd sum_greens sum_others, ytitle(Number of mixed-gender races)  blabel(total, size(medsmall)) ylabel(0 (300) 1900,  angle(horizontal)) bargap(2) legend(label(1 "CSU") label(2 "SPD") label(3 "Greens") label(4 "Other")) bar(4, lcolor(gray) fcolor(gray))

graph export FigureA14/figurea14.pdf, replace



